home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_04 / letters / selftest.c < prev   
Text File  |  1994-01-20  |  406b  |  22 lines

  1. @CSOURCE6.5 = #define EPROM_SIZE    0x10000<R>
  2. <R>
  3. unsigned char volatile    *eprom;<R>
  4. unsigned char        sum;<R>
  5. <R>
  6. f<%-2>or (eprom = 0; eprom << (EPROM_SIZE - 1); ++eprom)<R>
  7. <%0>{<R>
  8.     sum += *eprom;<R>
  9. }<R>
  10. <R>
  11. *eprom = sum;    /* RAM based debugging support */<R>
  12. <R>
  13. if (*eprom != sum)<R>
  14. {<R>
  15.     /* Failed diagnostics */<R>
  16. }<R>
  17. <R>
  18.     /* Continue with other code */<R>
  19. <R>
  20. /* End of File */ 
  21.  
  22.